home *** CD-ROM | disk | FTP | other *** search
- <WIZIF not ParameterExists('URLPath')>
- <WIZSET URLPath = ''>
- </WIZIF>
-
- <!--- template settings --->
- <CFSET SearchDirectory = "$${WorkingDirectory}">
- <CFSET SearchCollection = "$${Collection}">
- <CFSET UseURLPath = "<WIZIF URLPath EQ ''>NO<WIZELSE>YES</WIZIF>">
-
-
-
- <!--- retrieve requested files --->
- <CFSEARCH
- name = "GetResults"
- collection = "#SearchCollection#"
- criteria = "#Form.Criteria#"
- maxRows = "#Evaluate(Form.MaxRows + 1)#"
- startRow = "#Form.StartRow#"
- >
-
-
-
- <HTML><HEAD>
- <TITLE>$${ApplicationName} - Search Results</TITLE>
- </HEAD><BODY bgcolor="ffffff">
-
- <FONT size="+1">$${ApplicationName}</FONT> <BR>
- <FONT size="+2"><B>Search Results</B></FONT>
-
- <P>
-
- <!--- no files found for specified criteria? --->
- <CFIF GetResults.RecordCount is 0>
- <B>No files found for specified criteria</B>
-
- <!--- ... else at least one file found --->
- <CFELSE>
-
- <TABLE cellspacing=0 cellpadding=2>
-
- <!--- table header --->
- <TR bgcolor="cccccc">
- <TD><B>No</B></TD>
- <TD><B>Score</B></TD>
- <TD><B>File</B></TD>
- <TD><B>Title</B></TD>
- </TR>
-
- <CFOUTPUT query="GetResults" maxRows="#Form.MaxRows#">
- <TR bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('ffffcf'))#">
-
- <!--- current row information --->
- <TD>#Evaluate(Form.StartRow + CurrentRow - 1)#</TD>
-
- <!--- score --->
- <TD>#Score# </TD>
-
- <!--- file name with the link returning the file --->
- <TD>
- <CFIF UseURLPath> <!--- URL parameter from cfsearch contains URL path info --->
- <CFSET href = Replace(URL, " ", "%20", "ALL")>
- <CFELSE> <!--- ... else use OpenFile to return the file --->
- <CFSET href = "MyApplication_VOpenFile.cfm?serverFilePath=#URLEncodedFormat(Key)#">
- </CFIF>
- <A href="#href#">#GetFileFromPath(Key)#</A>
- </TD>
-
- <!--- title for HTML files --->
- <TD>#Title# </TD>
-
- </TR>
- </CFOUTPUT>
-
- </TABLE>
-
-
- <!--- CFSEARCH tried to retrieve one more file than the number specified in the
- Form.MaxRows parameter. If number of retrieved files is greater than MaxRows
- we know that there is at least one file left. The following form contains only
- one button which reloads this template with the new StartRow parameter. --->
-
- <CFIF GetResults.RecordCount gt Form.MaxRows>
- <FORM action="$${SafeApplicationName}_VSearchResult.cfm" method="post">
- <CFOUTPUT>
- <INPUT type="hidden" name="Criteria" value="#Replace(Form.Criteria, """", "'", "ALL")#">
- <INPUT type="hidden" name="MaxRows" value="#Form.MaxRows#">
- <INPUT type="hidden" name="StartRow" value="#Evaluate(Form.StartRow + Form.MaxRows)#">
- <INPUT type="submit" value=" More ... ">
- </CFOUTPUT>
- </FORM>
- </CFIF>
-
- </CFIF>
-
- </BODY></HTML>
-